#pragma once

#include "point.h"
#include "matrix4.h"

class vector3
{

public:
	double x;
	double y;
	double z;
//Constructors/Destructors
	vector3();
	vector3(double XYZ);
	vector3(double X, double Y, double Z);
	vector3(point P1, point P2);
	vector3(point P);
	~vector3();

//Functions/Procedures
	void normalize();
	double width();
	void set(double X, double Y, double Z);
	void positive();
	void negative();
	void mul(vector3 vector);
	void mulByScalar(double scalar);
	void div(vector3 vector);
	void divByScalar(double scalar);
	void add(vector3 vector);
	void sub(vector3 vector);
	void cross(vector3 vector);
	vector3 cross2(vector3 vector);
	double dot(vector3 vector);
	void lerp(vector3 v, float t);

	void copyFromPoint(point P);

	point movePoint(point P);

	void getVector3FromXML(std::ifstream &file);

	void randomVector(double range);
	void randomDirectedVector(double range, vector3 N);

//Operators
	vector3 operator+();
	vector3 operator-();
	vector3 operator+( const vector3 &other );
	vector3 & operator+=( const vector3 &other );
	vector3 operator-( const vector3 &other );
	vector3 & operator-=( const vector3 &other );
	vector3 operator*( const vector3 &other );
	vector3 operator*( const double &scalar );
	vector3 operator*( const float &scalar );
	vector3 operator*( const int &scalar );
	vector3 operator*( const matrix4 &matrix );
	vector3 & operator*=( const vector3 &other );
	vector3 & operator*=( const double &scalar );
	vector3 & operator*=( const float &scalar );
	vector3 & operator*=( const int &scalar );
	vector3 operator/( const vector3 &other );
	vector3 operator/( const double &scalar );
	vector3 operator/( const float &scalar );
	vector3 operator/( const int &scalar );
	vector3 & operator/=( const vector3 &other );
	vector3 & operator/=( const double &scalar );
	vector3 & operator/=( const float &scalar );
	vector3 & operator/=( const int &scalar );
	vector3 & operator=( const vector3 &other );
	vector3 & operator=( const point &P );
	bool operator==( const vector3 &other );
	bool operator!=( const vector3 &other );
	bool operator>( vector3 &other );
	bool operator<( vector3 &other );
	bool operator>=( vector3 &other );
	bool operator<=( vector3 &other );

private:

};